Integrand size = 28, antiderivative size = 47 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx=\frac {B \text {arctanh}(\sin (c+d x))}{2 d}+\frac {C \tan (c+d x)}{d}+\frac {B \sec (c+d x) \tan (c+d x)}{2 d} \]
Time = 0.02 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx=\frac {B \text {arctanh}(\sin (c+d x))}{2 d}+\frac {C \tan (c+d x)}{d}+\frac {B \sec (c+d x) \tan (c+d x)}{2 d} \]
Time = 0.44 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.02, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 3489, 3042, 3227, 3042, 4254, 24, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^4(c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^4}dx\) |
\(\Big \downarrow \) 3489 |
\(\displaystyle \int \sec ^3(c+d x) (B+C \cos (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B+C \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle B \int \sec ^3(c+d x)dx+C \int \sec ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx+C \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle B \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {C \int 1d(-\tan (c+d x))}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle B \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx+\frac {C \tan (c+d x)}{d}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle B \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {C \tan (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {C \tan (c+d x)}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle B \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {C \tan (c+d x)}{d}\) |
3.3.23.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b Int[(b*Sin[e + f* x])^(m + 1)*(B + C*Sin[e + f*x]), x], x] /; FreeQ[{b, e, f, B, C, m}, x]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 5.04 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00
method | result | size |
derivativedivides | \(\frac {\tan \left (d x +c \right ) C +B \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(47\) |
default | \(\frac {\tan \left (d x +c \right ) C +B \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(47\) |
parts | \(\frac {B \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {C \tan \left (d x +c \right )}{d}\) | \(49\) |
parallelrisch | \(\frac {-B \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+B \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+2 B \sin \left (d x +c \right )+2 \sin \left (2 d x +2 c \right ) C}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(92\) |
risch | \(-\frac {i \left (B \,{\mathrm e}^{3 i \left (d x +c \right )}-2 C \,{\mathrm e}^{2 i \left (d x +c \right )}-B \,{\mathrm e}^{i \left (d x +c \right )}-2 C \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {B \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {B \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) | \(98\) |
norman | \(\frac {\frac {\left (B -2 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 B \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 B \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 C \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {B \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(160\) |
Time = 0.25 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.57 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx=\frac {B \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - B \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, C \cos \left (d x + c\right ) + B\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
1/4*(B*cos(d*x + c)^2*log(sin(d*x + c) + 1) - B*cos(d*x + c)^2*log(-sin(d* x + c) + 1) + 2*(2*C*cos(d*x + c) + B)*sin(d*x + c))/(d*cos(d*x + c)^2)
\[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx=\int \left (B + C \cos {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx \]
Time = 0.21 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.23 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx=-\frac {B {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 4 \, C \tan \left (d x + c\right )}{4 \, d} \]
-1/4*(B*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log (sin(d*x + c) - 1)) - 4*C*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 105 vs. \(2 (43) = 86\).
Time = 0.32 (sec) , antiderivative size = 105, normalized size of antiderivative = 2.23 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx=\frac {B \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - B \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}}}{2 \, d} \]
1/2*(B*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - B*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(B*tan(1/2*d*x + 1/2*c)^3 - 2*C*tan(1/2*d*x + 1/2*c)^3 + B*tan( 1/2*d*x + 1/2*c) + 2*C*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^ 2)/d
Time = 1.79 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.72 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x) \, dx=\frac {\left (B-2\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (B+2\,C\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {B\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]